             <div class="control-group">
                  <label class="control-label" for="widgetName">  插件名称</label>
                  <div class="controls">
                   <input id="widgetName" name="widgetName" type="text" required class="required"></input>
                   <span class="text-warning">*</span>
                  </div>
             </div>

             <div class="control-group">
                  <label class="control-label" for="adType">  广告类型</label>
                  <div class="controls">
                    <select id="adType" name="adType" >
                        <option value="adsense">Adsense</option>
                        <%if(widgetType==1||widgetType==2){%>
                        <option value="afv">AFV</option>
                        <%}%>                     
                        <option value="dfp">DFP</option>
                        <%if(widgetType==2||widgetType==1){%>
                        <option value="adm">百度广告管家</option>
                        <%}%>
                        <%if(widgetType!=4){%>                                  
                        <option value="baidu">Baidu</option>
                        <%}%>  
                        <%if(widgetType==2||widgetType==4){%>
                        <option value="banner">Banner</option>
                        <%}%>
                    </select>
                    <span class="text-warning">*</span>
                  </div>
             </div>

             <%if(widgetType==2){%> 
              <!--固定位插件下提供代码类型选择 同步代码和异步代码 -->
              <div id="ad-codeType" class="control-group" style="display:none;">
                  <label class="control-label" for="async">
                  代码类型
                  </label>
                  <div class="controls">
                    <select name="async" id="async">
                      <option value="0">同步代码</option>
                      <option value="1">异步代码</option>
                    </select>
                    <span class="text-warning">
                      *使用异步代码可以让页面加载更快
                    </span>
                  </div>
              </div>
             <%}%>

             <!-- Banner -->
             <%if(widgetType == 2){%>
               <div style="display:none;" class="gad-input ad-banner">
                  <div class="control-group">
                        <label class="control-label"> 广告位尺寸</label>
                        <div class="controls">
                             <div class="input-append input-prepend">
                               <span class="add-on">宽</span>
                               <input type="text" id="width" name="width" class="input-small" placeholder="必须正整数" ></input>        
                                <span class="add-on">px</span>
                              </div>
                              <div class="input-append input-prepend">
                               <span class="add-on">高</span>
                               <input type="text" id="height" name="height" class="input-small" placeholder="必须正整数" ></input>
                                <span class="add-on">px</span>
                              </div>
                              <span class="text-warning">*</span>
                        </div>
                  </div>
               </div>
             <%}%>
             <div class="control-group" id="gsize">
                  <label class="control-label" for="adSize">  广告尺寸</label>
                  <div class="controls">
                    <select id="adSize" name="adSize" >
                        <%var adsize = widgetType==1?['300x250','336x280','250x250','200x200']:widgetType==2?['300x250','336x280','728x90','160x600','120x600','120x240','320x50','970x90','468x60','234x60','300x600','250x250','200x200',
                        '125x125','728x15','468x15','200x90','180x90','160x90','120x90']:widgetType==3?['120x240','100x300','120x600']:['970x90','728x90','200x90','180x90','160x90','120x90','234x60','468x60','320x50'];
                          for(var i=0,len=adsize.length;i<len;i++){
                                   
                        %>
                        <option value="<%=adsize[i]%>" ><%=adsize[i]%></option>
                        <%}%>
                    </select>                    
                    <span class="text-warning">*</span>
                    <%if(widgetType == 2){%>
                    <div id="custom-adSize" style="display:none;">
                      <div class="input-append">
                        <input class="span2" type="text">
                        <button class="btn ok" type="button">确定</button>
                        <button class="btn cancel" type="button">取消</button>
                      </div>
                    </div>
                    <input type="button" class="btn-custom-adSize btn btn-small btn-info" value="自定义"></input>                    
                    <%}%>
                  </div>
             </div> 
             <%if(widgetType != 3){%>
             <!-- adsense and afv-->
             <div id="ad-adsense" class="gad-input">
               <div class="control-group">
                    <label class="control-label" for="pubID">pubID</label>
                    <div class="controls">
                        <input id="pubID" name="pubID" type="text" required class="required" placeholder="例如:pub-123412345"></input>
                        <span class="text-warning">*</span>
                    </div>
               </div>
               <div class="control-group">
                    <label class="control-label" for="slot"> Google Slot</label>
                    <div class="controls">
                        <input id="slot" name="slot" type="text" required class="required"></input>
                        <span class="text-warning">*</span>
                    </div>
               </div>
             </div>
             <!-- DFP -->
             <div id="ad-dfp" style="display:none;" class="gad-input">
               <div class="control-group">
                    <label class="control-label" for="dfpID"> DFP ID</label>
                    <div class="controls">
                        <input id="dfpID" name="dfpID" type="text" ></input>
                        <span class="text-warning">*</span>
                    </div>
               </div>
              <div class="control-group">
                    <label class="control-label" for="dfpName"> DFP Name</label>
                    <div class="controls">
                        <input id="dfpName" name="dfpName" type="text" ></input>
                        <span class="text-warning">*</span>
                    </div>
               </div>
             </div>
            <%}%>
             <% if(widgetType == 2|| widgetType == 4){%>
             <div style="display:none;" class="gad-input ad-banner">           
                <!--  Banners-->
                <div class="banners clearfix">
                    <div class="banner">

                          <div class="control-group">
                                <label class="control-label" for="adSize1">  广告尺寸1</label>
                                <div class="controls">
                                  <select id="adSize1" name="adSize1" >
                                 <% for(var i=0,len=adsize.length;i<len;i++){ %>
                                  <option value="<%=adsize[i]%>" ><%=adsize[i]%></option>
                                  <%}%>                    
                                  </select>                    
                                </div>
                           </div>

                           <div class="control-group">
                                <label class="control-label" for="pubID1">PubID1</label>
                                <div class="controls">
                                    <input id="pubID1" name="pubID1" type="text" validate="no"  placeholder="例如:pub-123412345"></input>                                    
                                </div>
                           </div>

                          <div class="control-group">
                                <label class="control-label" for="slot1">Slot1</label>
                                <div class="controls">
                                    <input id="slot1" name="slot1" type="text" validate="no"></input>                                    
                                </div>
                           </div>

                      </div>
                      <div class="banner">

                           <div class="control-group">
                                <label class="control-label" for="adSize2">  广告尺寸2</label>
                                <div class="controls">
                                  <select id="adSize2" name="adSize2" >
                                 <%for(var i=0,len=adsize.length;i<len;i++){ %>                                                                  
                                    <option value="<%=adsize[i]%>" ><%=adsize[i]%></option>
                                  <%}%>                    
                                  </select>                    
                                </div>
                           </div>

                          <div class="control-group">
                                <label class="control-label" for="pubID2">PubID2</label>
                                <div class="controls">
                                    <input id="pubID2" name="pubID2" type="text"  placeholder="例如:pub-123412345" validate="no"></input>                                    
                                </div>
                           </div>

                          <div class="control-group">
                                <label class="control-label" for="slot2">Slot2</label>
                                <div class="controls">
                                    <input id="slot2" name="slot2" type="text" validate="no"></input>                                    
                                </div>
                           </div>

                      </div>
                  </div>
                
             </div>
             <% }%>

             <%if(widgetType == 3){%>

              <div class="gad-input ad-couplet">           
                <!-- 对联广告 -->
                <div class="banners clearfix">
                    <div class="banner">
                       <div class="control-group">
                          <label class="control-label" for="pubID1">Left PubID</label>
                          <div class="controls">
                              <input id="pubID1" name="pubID1" type="text" validate="no"  placeholder="例如:ca-pub-123412345"></input>                                    
                          </div>
                       </div>

                       <div class="control-group slot">
                          <label class="control-label" for="slot1">Left Slot</label>
                          <div class="controls">
                              <input id="slot1" name="slot1" type="text" validate="no">
                              </input>                                 
                          </div>
                       </div>

                      </div>
                      <div class="banner">

                        <div class="control-group">
                          <label class="control-label" for="pubID2">Right PubID</label>
                          <div class="controls">
                              <input id="pubID2" name="pubID2" type="text"  placeholder="例如:ca-pub-123412345" validate="no"></input>                                    
                          </div>
                         </div>

                        <div class="control-group slot">
                          <label class="control-label" for="slot2">Right Slot</label>
                          <div class="controls">
                              <input id="slot2" name="slot2" type="text" validate="no">
                              </input>                                    
                          </div>
                         </div>

                      </div>
                  </div>
                
             </div>

             <%}%>
             <!-- widget style-->
             <%if(widgetType==1){%>
              <div class="control-group">
                    <label class="control-label" for="widgetStyle">弹窗样式</label>
                    <div class="controls">
                    <label class="label-radio">
                      <input type="radio" name="widgetStyle" value="1" checked/>
                      默认样式
                    </label>
                    <label class="label-radio">
                      <input type="radio" name="widgetStyle" value="2"/>
                      百度样式
                    </label>
                    </div>
              </div>             
             <%}else if(widgetType==4){%>

              <div class="control-group">
                    <label class="control-label" for="backColor">自定义样式</label>
                    <div class="controls">
                      <div id="back-generate">
                        <div class="banner-demo">
                          <input type="hidden" id="backColor" name="backColor" value="#000"/>
                           <input type="hidden" id="borderColor" name="borderColor"/>
                          <label><span>广告显示在这里</span></label>
                        </div>
                        <ul class="preview-back">
                          <li>
                            <span>横幅背景颜色</span>
                            <a class="back black" href="javascript:;" title="黑色"></a>
                            <a class="back white" href="javascript:;" title="白色"></a>
                            <a class="back colorful" href="javascript:;" title="自定义颜色">
                            </a>
                            <a class="back transparent" href="javascript:;" title="透明"></a>
                          </li>
                          <li>
                            <span>广告边框颜色</span>
                            <a class="border colorful" href="javascript:;" title="自定义颜色">
                            </a>
                            <a class="border transparent" href="javascript:;" title="透明"></a>
                          </li>
                        </ul>                        

                      </div>
                    </div>
              </div>
              
             <%}%>
             <!-- isAlive-->
              <div class="control-group">
                    <label class="control-label" for="isAlive"> 激活插件</label>
                    <div class="controls">
                        <select id="isAlive" name="isAlive"  >
                          <option value="1">是</option>
                          <option value="0">否</option>
                        </select>
                    </div>
              </div>

             <div id="ad-setting">
               <div class="control-group">
                  <div class="controls">
                    <a href="javascript:;" class="setting">
                      更多设置↓
                    </a>
                    <a href="javascript:;" class="setting" style="display:none;">
                      更多设置↑
                    </a>
                  </div>
               </div>

               <div class="setting-box">                        

                  <%if(widgetType!=2&&widgetType!=4){%>
                    <div class="control-group">
                      <label class="control-label" for="closePosition">关闭按钮位置</label>
                      <div class="controls">
                        <select id="closePosition" name="closePosition">
                          <option value="tr">右上角</option>
                          <option value="tl">左上角</option>  
                          <option value="br">右下角</option>                        
                          <option value="bl">左下角</option>                          
                        </select>
                      </div>
                    </div>
                  <%}%> 

                  <%if(widgetType==1){%>                    
                    <div class="control-group">
                      <label class="control-label" for="showLogo">显示尚街标识</label>
                      <div class="controls">
                        <select id="showLogo" name="showLogo">
                          <option value="1">是</option>
                          <option value="0">否</option>
                        </select>
                      </div>
                    </div>

                    <div class="control-group">
                      <label class="control-label" for="showReplay">显示重新播放</label>
                      <div class="controls">
                        <select id="showReplay" name="showReplay">
                          <option value="1">是</option>
                          <option value="0">否</option>
                        </select>
                      </div>
                    </div>

                    <div class="control-group">
                      <label class="control-label" for="closeReplay">重新播放可关闭</label>
                      <div class="controls">
                        <select id="closeReplay" name="closeReplay">
                          <option value="0">否</option>
                          <option value="1">是</option>                          
                        </select>
                      </div>
                    </div>

                    <div class="control-group">
                          <label class="control-label" for="minitime">定时最小化</label>
                          <div class="controls">
                          <div class="input-append">
                           <input type="text" id="minitime" name="minitime" class="input-small" placeholder="必须是正整数" >                          
                            </input>
                            <span class="add-on">秒</span>
                          </div>
                      </div>
                    </div>
                    
                    <%}else if(widgetType==2){%>

                    <div class="control-group">
                      <label class="control-label" for="showClose">显示关闭按钮</label>
                      <div class="controls">
                        <select id="showClose" name="showClose">
                          <option value="0">否</option>
                          <option value="1">是</option>                      
                        </select>
                      </div>
                    </div>

                    <%}%>
                    
                    <div class="control-group">
                          <label class="control-label" for="adClickProb">点击概率</label>
                          <div class="controls">
                          <div class="input-append">
                           <input type="text" id="adClickProb" name="adClickProb" class="input-small" placeholder="值为0~100间的数字" value="0">                          
                            </input>
                            <span class="add-on">%</span>
                          </div>
                      </div>
                    </div>
                    
                    <div class="control-group">
                      <label class="control-label" for="trackUrl">CNZZ监控</label>
                      <div class="controls">
                        <input type="text" id="trackUrl" name="trackUrl" placeholder="CNZZ监控地址"></input>
                      </div>
                    </div>
                    <%if(widgetType==1){%>
                    <div class="control-group">
                      <label class="control-label" for="fdfpID">地域屏蔽</label>
                      <div class="controls">
                        <input type="text" class="input-small" id="fdfpID" name="fdfpID" placeholder="DFP ID" value=""></input>
                        <input type="text" class="input-small" id="fdfpName" name="fdfpName" placeholder="DFP Name" value=""></input>
                        <span class="text-warning">使用DFP进行地域屏蔽</span>
                      </div>
                    </div>
                    <%}%>
                  </div>
              </div>
